#cmake version required
cmake_minimum_required(VERSION 3.21.1)

#project name
set(pro_name gw_log)
project(${pro_name})

#setting cmake auto process qt UI MOC Src file
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)

#setting CXX standard version and required
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

#setting output file path
set(output_path ${CMAKE_CURRENT_SOURCE_DIR}/bin)
if(NOT EXISTS ${output_path})
    file(MAKE_DIRECTORY ${output_path})
endif()

#setting exe and lib file to output path 
set(EXECUTABLE_OUTPUT_PATH ${output_path})
set(LIBRARY_OUTPUT_PATH ${output_path})
set(QML_IMPORT_PATH ${output_path})

#find qt file
find_package(Qt5 REQUIRED COMPONENTS Quick Core Qml)

#add sub directory

add_subdirectory(components)
add_subdirectory(main)
